package com.shop.www.service.Impl;

import com.shop.www.dao.UserDAO;
import com.shop.www.model.User;
import com.shop.www.service.Userservice;

import java.util.List;

public class UserserviceImpl implements Userservice {
    private UserDAO userDAO1;

    @Override
    public User userlogin(String user_name, String user_psw) {//进行登录验证后获取详细消息
        return userDAO1.getuser(user_name, user_psw);
    }

    @Override
    public User getuserByID(Integer user_ID) {//根据ID获取详细信息
        return userDAO1.getsaller(user_ID);
    }

    @Override
    public List getseller() {//获取全部商家
        return userDAO1.getsellerlist();
    }

    @Override
    public void regist(User user) {
        userDAO1.adduser(user);
    }

    @Override
    public List getuserlist() {
        return userDAO1.getuserlist();
    }

    @Override
    public void banuser(User user) {
        userDAO1.updateuser(user);
    }
}
